package com.yuuzai.openworld;

public class OpenWorldException extends RuntimeException {

	private static final long serialVersionUID = -2795666865996070440L;

	private String message;

	public OpenWorldException() {
		super();
	}

	public OpenWorldException(String message) {
		super(message);
		this.setMessage(message);
	}

	public OpenWorldException(Throwable cause) {
		super(cause);
	}

	public OpenWorldException(String message, Throwable cause) {
		super(message, cause);
		this.setMessage(message);
	}
	
	public void setMessage(String value) {
		this.message = value;
	}

	public String getMessage() {
		return (this.message == null || this.message.isEmpty()) ? super.getMessage() : this.message;
	}

}
